package fields;
import game.Player;

public class Territory extends Ownable {

	public int rent;
	public int payPrice;
	
	public Territory (int number, String name, int price, int rent){
		
		super (number, name, price); 
		fieldValue=1;
		this.rent = rent;
	}
	
	public void landOnField(Player sp)
	{
		if (!isOwnable() && sp!=owner)
		{
			sp.transfer(getRent(), owner);
		}
		else {
			if (sp.getChoice()==1) buy(sp);
		}
		
	}
	
	public int getRent() {
		return rent;
	}
		
	public int getPayPrice() {
		return payPrice;
	}
		
	public void buy(Player s)
	{
		super.buy(s);
		s.addTerritory(this);;
	}	
	
		
}